Component({
    properties: {
        list: {
            type: null,
            value: []
        },
        footer: {
            type: null,
            value: {}
        }
    },
    lifetimes: {
        attached: function() {
            this.getiPnoneBottom();
        },
        moved: function() {},
        detached: function() {}
    },
    data: {
        iPnoneBottomBol: !1,
        showCircle: !1,
        loadCircle: !0
    },
    methods: {
        gotoUrl: function(t) {
            var e = t.currentTarget.dataset.link;
            if (e) try {
                wx.navigateTo({
                    url: e
                });
            } catch (t) {
                wx.reLaunch({
                    url: e
                });
            }
        },
        goTo: function(t) {
            switch (t.currentTarget.dataset.id) {
              case "1":
                wx.navigateTo({
                    url: "/packageG/index/index"
                });
                break;

              case "2":
                wx.navigateTo({
                    url: "/packageG/pages/category_v2/category_v2"
                });
                break;

              case "3":
                this.data.loadCircle && this.getTop(), this.setData({
                    showCircle: !this.data.showCircle
                });
                break;

              case "4":
                wx.navigateTo({
                    url: "/packageG/pages/buy/cart_v2/cart_v2"
                });
                break;

              case "5":
                wx.navigateTo({
                    url: "/packageG/member_v2/member_v2"
                });
                break;

              default:
                console.log("error");
            }
        },
        getiPnoneBottom: function() {
            try {
                wx.getStorageSync("iPhoneBottom") && this.setData({
                    iPnoneBottomBol: !0
                });
            } catch (t) {}
        },
        getPi: function() {
            var t = 3.1415926535, e = 180, a = 0, o = 0;
            for (var i = 0; i < 5; i++) {
                var n = 36 * i * t / 90;
                n >= 0 && n < t / 2 && (a = e - e * Math.cos(n), o = e + e * Math.sin(n)), n >= t / 2 && n < t && (a = e + e * Math.cos(n), 
                o = e - e * Math.sin(n)), n >= t && n <= 3 * t / 2 && (a = e - e * Math.cos(n), 
                o = e + e * Math.sin(n)), n >= 3 * t / 2 && n <= 2 * t && (a = e + e * Math.cos(n), 
                o = e - e * Math.sin(n)), console.log(a, o);
            }
            return 0;
        },
        getCirclePosition: function(t) {
            var e = t.x, a = t.y, o = t.r, i = t.nodeNum, n = t.nodeIndex, r = (t.changeAngle, 
            180 / i * n);
            return r += Number([ "", "270", "225", "210", "200", "200" ][this.data.list.length]), 
            {
                x_: e + o * Math.cos(r * Math.PI / 180),
                y_: a + o * Math.sin(r * Math.PI / 180)
            };
        },
        getTop: function() {
            for (var t = this.data.list.length, e = this.data.list, a = 0; a <= t - 1; a++) {
                var o = this.getCirclePosition({
                    x: 125,
                    y: 125,
                    r: 125,
                    nodeNum: t,
                    nodeIndex: a
                }), i = o.x_ - 10 + "px", n = o.y_ - 10 + "px";
                this.data.list[a].top = n, this.data.list[a].left = i;
            }
            this.setData({
                loadCircle: !1,
                list: e
            });
        },
        onClickHide: function() {
            this.setData({
                showCircle: !1
            });
        }
    }
});